#pragma once
#include <iostream>
#include <assert.h>
using namespace std;
typedef int SLDateType;
class SL
{
	friend ostream& operator<<(ostream& out, SL& sl);
public:
	SL(int capacity = 4);
	~SL();
	void check();
	void PushBack(int index);
	void PushFront(int index);
	void PopBack();
	void PopFront();
	void Insert(int pos,int index);
	void Erase(int pos);
	int Find(int index);
private:
	SLDateType* _arr;
	int _size;
	int _capacity;
};
ostream& operator<<(ostream& out,SL& sl);